package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.domain.BankAccountUpsert;
import com.jzo2o.customer.model.dto.response.BankAccountResDTO;
import com.jzo2o.customer.service.IServerBankService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("agencyServerBankController")
@RequestMapping("/agency")
@Api(tags = "机构段-银行卡相关接口")
public class ServerBankController {
    @Resource
    private IServerBankService serverBankService;

    /**
     * 添加银行卡信息
     *
     */
    @PostMapping("/bank-account")
    @ApiOperation("机构端添加银行卡信息")
    public void addBankAccout(@RequestBody BankAccountUpsert dto) {

        serverBankService.updateAccount(dto);
    }
    @GetMapping("/bank-account/currentUserBankAccount")
    @ApiOperation("获取当前机构账户信息")
    public BankAccountResDTO currentUserInfo() {
        return serverBankService.currentUserInfo();
    }


}
